//
//  Person.swift
//  DataStructureAndAlgorithm
//
//  Created by icemelon on 2021/8/3.
//

class Person: CustomStringConvertible, Comparable {
    static func < (lhs: Person, rhs: Person) -> Bool {
        lhs.age < rhs.age
    }
    
    static func == (lhs: Person, rhs: Person) -> Bool {
        return lhs.age == rhs.age
    }
    
    var age: Int = 0
    init(age: Int = 0) {
        self.age = age
    }
    
    var description: String {
        get {
            return "年龄是：" + String(age)
        }
    }
    
}

